package com.xbongbong.saas.model;

import com.xbongbong.pro.performance.pojo.PerformancePojo;
import com.xbongbong.paas.toolbox.wrap.IModel;
import com.xbongbong.saas.domain.entity.PerformanceEntity;

import java.util.List;
import java.util.Set;

/**
 * @description: 业绩目标
 * @Author: hongxiao
 * @date: 2019-01-27 09:34
 * @since v1.0
 */
public interface PerformanceModel extends IModel<PerformanceEntity> {
    Integer save(PerformanceEntity entity);
    void insertBatch(List<PerformanceEntity> entityList);
    Integer deleteByKey( Long key,  String corpid);
    PerformanceEntity getByKey( Long key,  String corpid);

    /**
     * 获取某个员工/部门在某一年的某个业绩目标
     * @param corpid 公司id
     * @param performancePojo 业绩目标pojo
     * @param setIdIn 指标id列表
     * @return 
     * @throws 
     * 
     * @author hongxiao
     * @date: 2019-01-27 11:23
     * @since v1.0
     * @version v1.0
     */
    List<PerformanceEntity> findEntitys(String corpid, PerformancePojo performancePojo, Set<Long> setIdIn);

    /**
     * 获取某个员工/部门在某一年的某个业绩目标
     * @param corpid 公司id
     * @param performancePojo 业绩目标pojo
     * @return
     * @throws 
     * 
     * @author hongxiao
     * @date: 2019-01-27 11:28
     * @since v1.0
     * @version v1.0
     */
    PerformanceEntity getPerformanceEntity(String corpid, PerformancePojo performancePojo);
}
